﻿using System;

namespace UFrame
{
    public class ConnectionGS : NetWork
    {
        private static ConnectionGS i = null;

        public static ConnectionGS I
        {
            get
            {
                if (i == null)
                {
                    i = new ConnectionGS();
                }

                return i;
            }
        }

        protected override void InitialProtocol()
        {
            // 配置表 临时方案
            //RegisterMsg((ushort)OpCode.query_metadata, "c_gs.MetaData", new ProtocolHandler(GameClient.Instance.OnMetaDataACK));
        }

        public void SendRPC(GSOpCode op)
        {
            SendRPC((ushort)op);
        }

        public void SendRPC<T>(GSOpCode op, T rpc)
        {
            SendRPC<T>((ushort)op, rpc);
        }

        protected override void OnConnected(object src, EventArgs arg)
        {
            base.OnConnected(src, arg);
        }

        protected override void OnConnectFailed(object src, EventArgs arg)
        {
        }

        protected override void OnDisconnected(object src, EventArgs arg)
        {
            PLDebug.Log("Connection_GS 断开链接");
        }
    }

    public enum GSOpCode
    {
    }
}